<?php

//class Quad_Orm_Relationship {
//	const ONE_TO_ONE = 1;
//	const ONE_TO_MANY = 2;
//	const MANY_TO_MANY = 3;
//	const MANY_TO_ONE = 4;
//	
//	protected $_table;
//	protected $_key;
//	protected $_fk;
//	protected $_type;
//	protected $_orm;
//	protected $_junction;
//	
//	public static function getInstance(Quad_Orm $orm, $foreignTable) {
//		$class = "Table_Relationship_{$this->_table}_{$foreignTable}";
//		return new $class($orm);
//	}
//	
//	public function __construct(Quad_Orm $orm) {
//		$this->_orm = $orm;
//	}
//	
//	public function load($class = null) {
//	  $class = ($class === null ? $this->_fk : $class); 
//		switch ($this->_type) {
//			case self::ONE_TO_ONE:
//			case self::MANY_TO_ONE:
//			  $sibling = new $class();
//			  $sibling->load(array($this->_fk => $this->_orm->{$this->_key}));
//			  return $sibling;
//			  
//			case self::ONE_TO_MANY:
//				$children = $this->_orm->find(array($this->_fk => $this->_orm->{$this->_key}));
//				return $children;
//
//			case self::MANY_TO_MANY:
//				$sql = ""
//		}
//	}
//}